<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			账户管理 <small>Welcome {$Think.config.system_tag}</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">角色列表</li>
			<div style="float:right"><a href="#" onclick="openlayer('角色列表','{:U('member/addMemberRole')}')">添加角色</a></div>
		</ol> 
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Search content-->
				<div class="panel panel-default" style="margin-bottom:0px; border-bottom:none">
					<div class="panel-body">
						<form class="layui-form" action="{:U('member/memberRoleList')}" method="post">
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:auto;">角色名</label>
								<div class="layui-input-inline" >
									<input value="{$filter.name}" type="text" name="name" placeholder="请输入角色名" autocomplete="off" class="layui-input">
								</div>
								<div class="layui-input-inline" style="width:auto;">
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!--Search content-->
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th>ID</th>
										<th>角色名</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="list" id="vo">
										<tr>
											<td style="line-height:30px">{$vo.id}</td>
											<td style="line-height:30px">{$vo.name}</td>
											<td style="line-height:30px">
												<if condition="$vo['status'] eq 1">
													开启
												<else />
													关闭
												</if>
											</td>
											<td>
												<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('编辑','{:U('Member/editMemberRole',array('id'=>$vo['id']))}');return false;">编辑</a>
												<a href="{:U('Member/authMemberRole',array('id'=>$vo['id']))}" class="layui-btn layui-btn-xs layui-btn-normal">授权</a>
												<if condition="$vo['status'] eq 1">
													<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要关闭吗?','{:U('Member/setMemberRole',array('id'=>$vo['id'],'status'=>0))}')">关闭</a>
												<else />
													<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要开启吗?','{:U('Member/setMemberRole',array('id'=>$vo['id'],'status'=>1))}')">开启</a>
												</if>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							{$page}
						</div>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	<script>
		layui.use('form', function(){
		  var form = layui.form;
		});
	</script>
	 <!-- /. PAGE INNER  -->
</div>
<include file="Common:footer" />
    